package com.zky.common.exception;

/**
 * @Description 库存异常
 * @Author 张开源
 * @Date 2022/12/12 15:44
 * @Version 1.0
 **/
public class NoStockException extends RuntimeException {

    private Long skuId;

    public NoStockException(String msg) {
        super(msg);
    }

    public NoStockException(Long skuId) {
        super("商品id：" + skuId + "没有足够库存");
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Long getSkuId() {
        return skuId;
    }
}
